<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">

  <title>电影评分报告</title>
  <meta content="" name="descriptison">
  <meta content="" name="keywords">

  <!-- 引入 ECharts 文件 -->
  <script src="static/assets/js/echarts.min.js"></script>

  <!-- Favicons -->
  <link href="assets/img/favicon.png" rel="icon">
  <link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">

  <!-- Google Fonts -->
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,600,600i,700,700i,900" rel="stylesheet">

  <!-- Vendor CSS Files -->
  <link href="static/assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link href="static/assets/vendor/icofont/icofont.min.css" rel="stylesheet">
  <link href="static/assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
  <link href="static/assets/vendor/animate.css/animate.min.css" rel="stylesheet">
  <link href="static/assets/vendor/venobox/venobox.css" rel="stylesheet">
  <link href="static/assets/vendor/aos/aos.css" rel="stylesheet">

  <!-- Template Main CSS File -->
  <link href="static/assets/css/style.css" rel="stylesheet">

</head>

<body>

  <!-- ======= Header ======= -->
  <header id="header">
    <div class="container">

      <div class="logo float-left">
        <h1 class="text-light"><a href="{{ url_for('index') }}"><span>Maverick</span></a></h1>
        <!-- Uncomment below if you prefer to use an image logo -->
        <!-- <a href="index.html"><img src="static/assets/img/logo.png" alt="" class="img-fluid"></a>-->
      </div>

      <nav class="nav-menu float-right d-none d-lg-block">
        <ul>
          <li><a href="/">首页</a></li>
          <li><a href="/movie">电影</a></li>
          <li class="active"><a href="/score">评分 <i class="la la-angle-down"></i></a></li>
          <li><a href="/word">词云</a></li>
          <li><a href="/team">团队</a></li>
        </ul>
      </nav><!-- .nav-menu -->

    </div>
  </header><!-- End Header -->

    <!-- ======= 评分图展示 ======= -->
    <section id="team" class="team">
      <div class="container">

        <div class="section-title">
          <h2>豆瓣电影Top250 评分分布图</h2>
          <p>应用Python爬虫、Flask框架、Echarts等技术实现.</p>
        </div>

          <!-- ======= 预览板块 ======= -->
        <section class="counts section-bg">
            <div class="container">
          <!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
          <div id="dom1" style="width: 98%;height:400px;"></div>
            </div>
        </section><!-- End Counts Section -->
      </div>
    </section><!-- 结束 首页 -->


    <!-- ======= Footer ======= -->
  <footer id="footer">

    <div class="container">
      <div class="copyright">Copyright &copy; 2020.Company name All rights reserved.</div>
      <div class="credits"></div>
    </div>
  </footer><!-- End Footer -->

  <a href="#" class="back-to-top"><i class="icofont-simple-up"></i></a>

  <!-- Vendor JS Files -->
  <script src="static/assets/vendor/jquery/jquery.min.js"></script>
  <script src="static/assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  <script src="static/assets/vendor/jquery.easing/jquery.easing.min.js"></script>
  <script src="static/assets/vendor/php-email-form/validate.js"></script>
  <script src="static/assets/vendor/jquery-sticky/jquery.sticky.js"></script>
  <script src="static/assets/vendor/venobox/venobox.min.js"></script>
  <script src="static/assets/vendor/waypoints/jquery.waypoints.min.js"></script>
  <script src="static/assets/vendor/counterup/counterup.min.js"></script>
  <script src="static/assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
  <script src="static/assets/vendor/aos/aos.js"></script>

  <!-- Template Main JS File -->
  <script src="static/assets/js/main.js"></script>

    <script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('dom1'));

        // 指定图表的配置项和数据
        var option = {
            title:{
                text: '豆瓣电影Top250 评分分布图'
            },
            color: ['#5c768d'],
            tooltip:{
                trigger: 'axis',
                axisPointer: {
                    type:'shadow'
                }
            },
            grid: {
                left:'4%',
                right: '3%',
                bottom: '3%',
                containLabel:true
            },
            xAxis: {
                type: 'category',
                data: {{ score | tojson}}
            },
            yAxis: {
                type: 'value'
            },
            series: [{
                data: {{ num }},
                <!--[120, 200, 150, 80, 70, 110, 130]-->
                type: 'bar',
                barWidth: '60%'
            }]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
    </script>
</body>

</html>